Modern single chip microcontrollers with limited pin count often employ ports that can be configured to perform several functions. Under some circumstances, a port is used to access external memory to fetch instructions or data. In other circumstances, a port may be connected to a peripheral I/O device if the microcontroller is using only on-chip memory.